<?php

class Form_PreferenceEmailForm extends Form_Custom_General {

    public function init() {

	$email = $this->createElement('text', 'email')
			->setRequired(TRUE)
			->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
			->addValidator(new Zend_Validate_EmailAddress())
			->addFilters(array(
			    new Zend_Filter_StringTrim(),
			    new Zend_Filter_StringToLower()
			))
			->setAttribs(Array("size" => "60"));
	$email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
	$this->addElement($email);

	$submit = $this->createElement('submit', 'Submit');
	$this->addElement($submit);
	
	$reset = $this->createElement('reset', 'Reset');
	$this->addElement($reset);
    }

}